package cn.easyutil.veteran.core.condition;

import java.io.Serializable;
import java.util.List;

/**
 * 表达式原始数据
 * 暂定提供的环境变量有如下3种
 *  $_user : 可以获取用户的属性信息
 *  $_event: 可以获取用户的事件信息
 *  $_system: 可以获取系统提供的信息
 */
public class ConditionEntity implements Serializable {

    //属性key
    private List<String> keys;
    //样式，前端使用字段
    private String style;
    //转换后的表达式 ,例如 $_user.name!=null && $_user.name=='lucy'
    private String expression;
    //与下一个表达式之间的关系
    private ConditionJoinOperatorEnum joinOperator;
    //如果包含children，则会忽略本层的配置，把本层当作一个组来看待
    private List<ConditionEntity> children;

    public List<String> getKeys() {
        return keys;
    }

    public void setKeys(List<String> keys) {
        this.keys = keys;
    }

    public String getStyle() {
        return style;
    }

    public void setStyle(String style) {
        this.style = style;
    }

    public String getExpression() {
        return expression;
    }

    public void setExpression(String expression) {
        this.expression = expression;
    }

    public ConditionJoinOperatorEnum getJoinOperator() {
        return joinOperator;
    }

    public void setJoinOperator(ConditionJoinOperatorEnum joinOperator) {
        this.joinOperator = joinOperator;
    }

    public List<ConditionEntity> getChildren() {
        return children;
    }

    public void setChildren(List<ConditionEntity> children) {
        this.children = children;
    }
}
